# To change this template, choose Tools | Templates
# and open the template in the editor.

__license__ = "GPL http://www.gnu.org/licenses/gpl.txt"
__author__ = "xushengs@gmail.com"
__homepage__ = "http://fdream.net"
__date__ ="2010-2-26 18:14:13"
__version = "0.1"

#from gtw import *
from api import twitterAPI
from UserLog import UserLog
from Home import Home
from User import User
from AjaxAPI import AjaxAPI
#from google.appengine.api import urlfetch
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

DEBUG = True

# URL maps due to the rule of twitter.com
urls = (
    ('^/a/.+', twitterAPI),
    ('^/s/.+', twitterAPI),
    ('^/login/?', UserLog),
    ('^/logout/?', UserLog),
    #('^/friendships/?', FriendShip),
    #('^/blocks/?', FriendShip),
    #('^/lists/?', List),
    ('^/home/?', AjaxAPI),
    ('^/[\w/]+', User),
    ('^/.*', Home)
)

def main():
    application = webapp.WSGIApplication(urls, debug=DEBUG)
    run_wsgi_app(application)

if __name__ == '__main__':
    main()
